package com.lession.service;

import com.lession.mapper.PxtcsMapper;
import com.lession.pojo.PXTCS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PxtcsService {
	
	@Autowired
	public PxtcsMapper mapper;
	
	//查询所有系统参数
	public List<PXTCS> selectAll() {
		return mapper.selectAll();
	}
	
	//根据系统参数名称查询参数value
	public String getValByKey(String name) {
		return mapper.getValByKey(name);
	}
	
	//新增系统参数
	public boolean insertPxtcs(PXTCS pxtcs) {
		return mapper.insertPxtcs(pxtcs) > 0;
	}
	
	//更新系统参数
	public boolean updatePxtcs(PXTCS pxtcs) {
		return mapper.updatePxtcs(pxtcs) > 0;
	}
	
}
